The Art of Clean Code by Christian Mayer
Author:Christian Mayer [Mayer, Christian]
Language: eng
Format: epub, pdf
ISBN: 9781718502192
Published: 2022-05-10T00:00:00+00:00
In other words, you should minimize the dependencies of your code objects. By reducing dependencies between code objects, you reduce the complexity of your code and, in turn, improve maintainability. One specific implication is that every object should call only its own methods or methods from adjacent objects rather than call methods of objects it obtains from calling a method of an adjacent object. For the sake of explanation, letâs define two objects A and B as friends if A calls a method provided by B. Simple. But what if Bâs method returns a reference to object C? Now, object A may perform something like this: B.method_of_B().method_of_C(). This is called chaining of method callsâin our metaphor, you talk to a friend of your friend. The Law of Demeter says to talk only to your immediate friends, so it discourages this type of method chaining. This may sound confusing at first, so letâs dive into the practical example shown in Figure 4-3.
Figure 4-3: Law of Demeter: talking only to your friends to minimize dependencies
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12595)
Hello! Python by Anthony Briggs(9928)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9804)
The Mikado Method by Ola Ellnestam Daniel Brolund(9787)
Dependency Injection in .NET by Mark Seemann(9348)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7773)
Grails in Action by Glen Smith Peter Ledbrook(7705)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7568)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7192)
Microservices with Go by Alexander Shuiskov(6956)
Practical Design Patterns for Java Developers by Miroslav Wengner(6873)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6818)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6426)
Angular Projects - Third Edition by Aristeidis Bampakos(6236)
The Art of Crafting User Stories by The Art of Crafting User Stories(5752)
NetSuite for Consultants - Second Edition by Peter Ries(5678)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5493)
Kotlin in Action by Dmitry Jemerov(5076)
